/**
 * @author shangyd
 * @Date 2015年5月17日 上午10:41:33
 * Copyright (c) 2015
 **/
package com.sdw.soft.demo.web.action;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sdw.soft.activemq.JMSMessageOperator;
import com.sdw.soft.activemq.vo.Notify;
import com.sdw.soft.common.argument.annotation.Search;

@Controller
@RequestMapping(value="demo")
public class DemoController {

	private static final Logger logger = LoggerFactory.getLogger(DemoController.class);
	
	@RequestMapping(value="index")
	public String demo(@Search(values = "notifyable") Notify notify){
		JMSMessageOperator operator = new JMSMessageOperator();
//		notify = new Notify();
		notify.setTitle("hell");
//		notify.setContent("hello activeMQ");
//		operator.notifyUserMessage(notify);
		logger.info("notify title is :" + notify.getTitle() + ",content is :" + notify.getContent());
		return "demo/index";
	}
}
